<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:composite="http://java.sun.com/jsf/composite"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">

<composite:interface>
	<composite:attribute name="title" />
</composite:interface>

<composite:implementation>
	<h2>Post a new community activity</h2>
	
	<div id="addActivity">
		<h:form id="addActivityForm">
			<p:outputLabel for="text">Text:</p:outputLabel>			
			
			<p:inputTextarea id="text" rows="6" cols="100" required="true" value="#{activityBean.newActivityText}" />
			<p:message for="text" />
			
			<p:commandButton id="addActivityButton" value="Post activity" action="#{activityBean.newCommunityActivity}">
				<f:param name="id" value="#{communityBean.currentCommunity.ID}" />				
			</p:commandButton>	
			<p:message for="addActivityButton" />
		</h:form>
	</div>	
	
</composite:implementation>
</html>